/// by fanxiushu 2018-08-31

#pragma once

// {99B9E828-FB01-4ABB-A571-5F2555BBEC0C}
DEFINE_GUID(GUID_WDDM_FILTER_USER_INTERFACE ,
	0x99b9e828, 0xfb01, 0x4abb, 0xa5, 0x71, 0x5f, 0x25, 0x55, 0xbb, 0xec, 0xc);


/////

// 函数声明：供其他模块调用 IOCTL 处理入口
NTSTATUS handle_ioctl(PIRP irp, PIO_STACK_LOCATION irp_stack);
NTSTATUS wddm_filter_handle_ioctl(PDEVICE_OBJECT DeviceObject, PIRP Irp);

// IOCTL 基础和命令（用户态程序应使用相同定义）
#define WDDM_FILTER_IOCTL_BASE 0x800
#define IOCTL_WDDM_FILTER_CMD \
	CTL_CODE(FILE_DEVICE_VIDEO, WDDM_FILTER_IOCTL_BASE + 0x10, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_WDDM_FILTER_REMOVE \
	CTL_CODE(FILE_DEVICE_VIDEO, WDDM_FILTER_IOCTL_BASE + 0x11, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_WDDM_FILTER_ADD \
	CTL_CODE(FILE_DEVICE_VIDEO, WDDM_FILTER_IOCTL_BASE + 0x12, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_WDDM_FILTER_UNLOAD \
	CTL_CODE(FILE_DEVICE_VIDEO, WDDM_FILTER_IOCTL_BASE + 0x13, METHOD_BUFFERED, FILE_ANY_ACCESS)

// 新的 ADD_VMON 输入结构：宽度、高度、显示名 (ANSI, NUL terminated)
#define WDDM_FILTER_MAX_NAME 64
typedef struct _WDDM_FILTER_ADD_INPUT {
	ULONG Width;
	ULONG Height;
	CHAR  Name[WDDM_FILTER_MAX_NAME];
} WDDM_FILTER_ADD_INPUT, *PWDDM_FILTER_ADD_INPUT;





